home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 11690 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1015 b 

  1. Path: news.dseg.ti.com!news    
  2. From: grubin@ti.com (Geoffrey Rubin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ Shortcomings ?
  5. Date: 15 Mar 1996 18:55:35 GMT
  6. Organization: AWP
  7. Message-ID: <4icef7$im2@mksrv1.dseg.ti.com>
  8. References: <31488E8D.167E@aw.sgi.com>
  9. NNTP-Posting-Host: cna0185662.dseg.ti.com
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <31488E8D.167E@aw.sgi.com>, mgix@aw.sgi.com says...
  15. >2. Pointer type manipulation
  16. >-----------------------------
  17. >
  18. >A very disappointing thing in C++ (unless I am mistaken and it is actually
  19. >possible to do so) is the following situation:
  20. >
  21. >If A is a class, then most operations on A can be redefined.
  22. >Because A is a full blown type.
  23. >
  24. >Sadly, the same can not be said about A* (type: pointer to A).
  25. >
  26. ... snip
  27.  
  28. Have you thought of using a distinct class B that encapsulates 
  29. internally that it contains an A*. This prevents anyone using the
  30. B class from knowing anything except what you make visible.
  31.  
  32. Geoffrey
  33.  
  34.